package com.workcell.workdata.im.component.event;

import com.workcell.workdata.im.entity.Subscriber;
import org.springframework.context.ApplicationEvent;

public class SubscriberEvent extends ApplicationEvent {

    private final String action;

    public SubscriberEvent(Subscriber subscriber, String action) {
        super(subscriber);
        this.action = action;
    }

    public long getUid() {
        return ((Subscriber) source).getUid();
    }

    public long getServerId() {
        return ((Subscriber) source).getServerId();
    }

    public String getAction() {
        return action;
    }
}
